Moving away from PHP and running towards server-side JavaScript [on hold]
Posted
by
Sosukodo
on Programmers
See other posts from Programmers
or by Sosukodo
Published on 2014-06-03T09:44:11Z
Indexed on
2014/06/03
15:53 UTC
Read the original article
Hit count: 246
JavaScript
|server-side
I've decided to start moving away from PHP and server-side JavaScript looks like an attractive replacement. However, I'm having a hard time wrapping my head around how others are using Node.js for web applications. I'm currently using Lighttpd with FastCGI PHP.
The one thing I like about PHP is that I can "inline" my scripts in the document like so:
<?php echo 'Hello, World!'; ?>
My question is: Is there any server-side JavaScript solution that I can use in this manor? For instance, I'd love to be able to do this:
<?js print('Hello, World!'); ?>
Is there such a thing? I'm not looking for opinions about "which is better". I just want to know what's out there and I'll explore each of them on my own. The important thing is that I'd like to use it like I demonstrated above.
Links to the software along with implementation examples will be considered above other answers.
© Programmers or respective owner